/*
 * Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd.
 * SPDX-License-Identifier: Apache-2.0
 */

@import 'tailwindcss';
@import './base.css';

/* 使用 CSS 层级来控制 Tailwind 样式优先级 */
/* @import "tailwindcss" layer(tailwind); */

/* 修复 Tailwind base 样式对 Arco 组件的影响 */
@layer base {
  /* 恢复 Arco TreeNode 中元素的正确显示属性 */
  .arco-tree img,
  .arco-tree svg,
  .arco-tree-node img,
  .arco-tree-node svg,
  .arco-tree-node-switcher svg,
  .arco-tree-node-icon svg {
    display: inline !important;
    vertical-align: baseline !important;
  }
  body {
    word-break: normal; /* 不拆分单词 */
    overflow-wrap: normal; /* 不允许在单词内换行 */
  }

  /* 修复其他可能受影响的 Arco 组件 */
  .arco-btn img,
  .arco-btn svg,
  .arco-input img,
  .arco-input svg,
  .arco-select img,
  .arco-select svg {
    display: inline !important;
    vertical-align: middle !important;
  }
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image: url('./wavy-lines.svg');
  background-size: cover;
  user-select: none;
}

code {
  font-weight: 600;
  padding: 3px 5px;
  border-radius: 2px;
  background-color: var(--color-background-mute);
  font-family:
    ui-monospace,
    SFMono-Regular,
    SF Mono,
    Menlo,
    Consolas,
    Liberation Mono,
    monospace;
  font-size: 85%;
}

#root {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-bottom: 80px;
}

.logo {
  margin-bottom: 20px;
  -webkit-user-drag: none;
  height: 128px;
  width: 128px;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 1.2em #6988e6aa);
}

.creator {
  font-size: 14px;
  line-height: 16px;
  color: var(--ev-c-text-2);
  font-weight: 600;
  margin-bottom: 10px;
}

.text {
  font-size: 28px;
  color: var(--ev-c-text-1);
  font-weight: 700;
  line-height: 32px;
  text-align: center;
  margin: 0 10px;
  padding: 16px 0;
}

.tip {
  font-size: 16px;
  line-height: 24px;
  color: var(--ev-c-text-2);
  font-weight: 600;
}

.react {
  background: -webkit-linear-gradient(315deg, #087ea4 55%, #7c93ee);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.ts {
  background: -webkit-linear-gradient(315deg, #3178c6 45%, #f0dc4e);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.actions {
  display: flex;
  padding-top: 32px;
  margin: -6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.action {
  flex-shrink: 0;
  padding: 6px;
}

.action a {
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border: 1px solid transparent;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 20px;
  padding: 0 20px;
  line-height: 38px;
  font-size: 14px;
  border-color: var(--ev-button-alt-border);
  color: var(--ev-button-alt-text);
  background-color: var(--ev-button-alt-bg);
}

.action a:hover {
  border-color: var(--ev-button-alt-hover-border);
  color: var(--ev-button-alt-hover-text);
  background-color: var(--ev-button-alt-hover-bg);
}

.versions {
  position: absolute;
  bottom: 30px;
  margin: 0 auto;
  padding: 15px 0;
  font-family: 'Menlo', 'Lucida Console', monospace;
  display: inline-flex;
  overflow: hidden;
  align-items: center;
  border-radius: 22px;
  background-color: #202127;
  backdrop-filter: blur(24px);
}

.versions li {
  display: block;
  float: left;
  border-right: 1px solid var(--ev-c-gray-1);
  padding: 0 20px;
  font-size: 14px;
  line-height: 14px;
  opacity: 0.8;
  &:last-child {
    border: none;
  }
}

@media (max-width: 720px) {
  .text {
    font-size: 20px;
  }
}

@media (max-width: 620px) {
  .versions {
    display: none;
  }
}

@media (max-width: 350px) {
  .tip,
  .actions {
    display: none;
  }
}

.allotmentContainer {
  --separator-border: transparent;
  --focus-border: var(--primary-color);
  --sash-hover-size: 4px;
  .split-view .split-view-container {
    overflow-x: hidden;
  }
  .split-view-view {
    min-width: 0;
  }
  .split-view-view:last-child {
    min-width: 340px;
  }
}

/* 禁用拖拽时的样式 */
.allotment-disabled {
  .sash-container {
    .sash {
      pointer-events: none !important;
      cursor: default !important;
    }
    .sash:hover {
      background-color: transparent !important;
    }
  }
}
